The present invention relates to a packet data communication device.
Typical examples of interfaces for connection between information devices are an RS232C interface and Centronics interface. These interfaces, however, do not provide reliable communication channels, thus having a possibility that errors occur. Accordingly, for such interfaces, upper-layer protocols such as BSC (Binary Synchronous Communication), XMODEM, YMODEM and the like having an error-detection and retransmission function have conventionally been used to thereby ensure the reliability.
In addition to the interfaces of the above type, interfaces for infrared data communication are also available, and systems therefor standardized by the IrDA (Infrared Data Association), which is an industry standardization group, have been widely used in notebook personal computers, PDAs (Personal Data Assistants) or the like. An example of the standards of the IrDA is IrTran-P (Infrared Transfer Picture), which has been devised as an image transfer protocol. The IrTran-P is a host or upper protocol of IrCOMM (one of the IrDA standards), which is a protocol that allows devices to be seemingly connected therebetween by RS232C interfaces with the use of the infrared data communication.
However, because the protocol IrTran-P presupposes a reliable lower-layer communication channel, IrTran-P itself is not provided with the error-detection and retransmission function. It has been a precondition for use of IrTran-P that the communication channel reliability is ensured by IrLAP, which is a lower-layer protocol of IrTran-P. Accordingly, IrTran-P could not be used as an upper layer for unreliable lower-layer protocols such as RS232C and Centronics. This is a first problem.
A possible solution to the first problem may be use of BSC, XMODEM, YMODEM or the like having the error-detection and retransmission function as an intermediate layer between an is unreliable communication channel and the IrTran-P protocol to thereby ensure the reliability. However, since the error-detection and retransmission procedure is performed in fixed-length packets in these intermediate layers, a redundant communication processing is involved in the transfer of large volumes of data, causing a second problem that a unnecessarily prolonged communication time is required.
Usually, the error-detection and retransmission procedure is performed throughout data communication. That is, the error-detection and retransmission procedure is performed at all times, from connection setting through data transfer to disconnection, in the intermediate layer. However, in a communication channel in which an error occurs at the time of connection setting, errors would also tend to occur frequently in the subsequent communication, which makes it difficult to normally end the communication. Therefore, the error-detection and retransmission at the connection setting can be considered as redundant. Unfortunately, however, with methods using the aforementioned BSC, XMODEM or YMODEM, it is impossible to suppress the error-detection and retransmission at the connection setting and perform the error-detection and retransmission only after the connection establishment. This is a third problem.
An object of the invention is therefore to provide a data communication device which can solve the problems described above, and which enables the packet data communication in an IrTran-P format even when an unreliable lower-layer transmission channel such as RS232C is used.
According to the present invention, there is provided a packet data communication device, comprising:
a lower-layer communication means including at least a first lower-layer portion having no error-detection and retransmission function; and
an upper-layer communication means having an IrTran-P function and an error-detection and retransmission function, wherein
when the first lower-layer portion is used, the upper-layer communication means performs error-detection and retransmission of arbitrary-length packet data.
With this arrangement, because the upper-layer communication means has a function of performing an error-detection and retransmission of arbitrary-length packet data, the IrTran-P protocol can be used as an upper layer of an unreliable lower-layer protocol such as RS232C or Centronics. That is, the present invention solves the first and second problems described above.
Further, because the error-detection and retransmission is performed in the upper-layer communication means for each of arbitrary-length packets, and not fixed-length packets, less processing is required for the error-detection and retransmission even when a large volume of data is transferred.
In one embodiment, the lower-layer means includes the first lower-layer portion and a second lower-layer portion having an error-detection and retransmission function and the upper-layer communication means has a function of selecting one of the first and the second lower-layer portions. When the first lower-layer portion having no error-detection and retransmission function is used, the upper-layer communication means performs error-detection and retransmission of arbitrary-length packet data. When the second lower-layer portion having an error-detection and retransmission function is used, the upper-layer communication means does not perform the error-detection and retransmission of the arbitrary-length packet data.
In one embodiment, when the first lower-layer portion having no error-detection and retransmission function is used, the upper-layer communication means does not perform the error-detection and retransmission at a time of connection setting, and once the connection is established, the upper-layer communication means performs the error-detection and retransmission during communications subsequent to the connection establishment. This embodiment solves the third problem described above. If an error has occurred at the time of connection setting, preferably a connection setting procedure may be restarted without performing the error-detection and retransmission.
Other objects, features and advantages of the present invention will be obvious from the following description.